<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{include file="head.tpl"}
<script type="text/javascript">
function refreshcaptcha(){
	var $img = $("#captchaimg");
	var url = $img.attr("src");
	$img.attr("src", url);
	$("#captchainput").focus();//使验证码重新进行校验
};
$(function(){
	validateform($("form"), "{$_SERVER_ROOT}images/onError.png", "{$_SERVER_ROOT}images/onCorrect.png", "{$_SERVER_ROOT}images/onFocus.png");

	
	$("#refreshcaptcha").click(function(event){
		event.stopPropagation();
		event.stopImmediatePropagation();
		event.preventDefault();

		setTimeout('refreshcaptcha()',0);
		return false;
	});
});
</script>
</head>
<body>
<form action="{$_SERVER_ROOT}login.php" method="post">
用户名:<input type="text" name="username" /><font color="red"><span style="width:190px;line-height:22px;height:22px;" class="onShow"></span></font>	<br />
密码:<input type="password" name="passwd" /><font color="red"><span style="width:190px;line-height:22px;height:22px;" class="onShow"></span></font>
<br/>	
验证码:<input type="text" id="captchainput" name="captcha" required="required" vtype="captcha" captchaurl="{$_SERVER_ROOT}captcha.php?id={$captchaid}&captcha=[value]"/>
<font color="red"><span style="width:190px;line-height:22px;height:22px;" class="onShow"></span></font>	
<input type="hidden" name="captchaid" value="{$captchaid}" />
<br />
<img id="captchaimg" src="{$_SERVER_ROOT}captcha.php?id={$captchaid}" />
<a id="refreshcaptcha" href="#">刷新</a>
<br />
<span>{$error}</span><br/>
<input type="submit" value="登录"/>
</form>
</body>
</html>
